<?php
// -----------------------------------------------------
// Created by : php-orm
// -----------------------------------------------------
// Date: 2021/5/27
// -----------------------------------------------------
// Time: 12:54
// -----------------------------------------------------
// User: tf <1096392101@qq.com>
// -----------------------------------------------------
declare (strict_types=1);

namespace Gao\orm\db;

/**
 * Class Db
 * @package Gao\orm\db
 * @method Query table(string $tableName) static 表名
 * @method Query startTrans() static 启动事务
 * @method Query commit() static 启动事务
 * @method Query rollback() static 启动事务
 */
class Db
{
    public static function __callStatic($method, $arguments)
    {
        $class = '\\Gao\\orm\\db\\Query';
        $connection = '\\Gao\\orm\\db\\MysqlConnection';
        $build = '\\Gao\\orm\\db\\MysqlBuilder';
        return call_user_func_array([new $class($connection,$build), $method], $arguments);
    }
}